package com.qf.controller;

import com.qf.pojo.Ssp;
import com.qf.pojo.resp.BaseResult;
import com.qf.service.SspService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ssp")
public class SspController {
    @Autowired
    SspService sspService;
//@RequestMapping("/findAll")
//    public List<Ssp> findAll(Model model){
//    Ssp ssp =new Ssp();
//    model.addAttribute("ssp",ssp);
//    return sspService.findAll();
//    }

    @RequestMapping("/findAll")
    public BaseResult findAll(){
        BaseResult ssp =sspService.findAll();
        return ssp;
    }

}
